import request from "@/utils/request";

// 获取供应商列表
export function getSupplierListApi(query, data = {}) {
  return request({
    url: "/system/supplier/queryErpSuppList",
    method: "post",
    params: query,
    data,
  });
}

// 新增供应商
export function addSupplierApi(data) {
  return request({
    url: "/system/evaluation/insterEvaluate",
    method: "post",
    data,
  });
}

// 新增供应商
export function addScoreApi(data) {
  return request({
    url: "/system/supplier/add",
    method: "post",
    data,
  });
}

// 修改供应商
export function editScoreApi(data) {
  return request({
    url: "/system/supplier/edit",
    method: "post",
    data,
  });
}

// 获取供应商详情
export function getSupplierApi(supplierId) {
  return request({
    url: "/system/supplier/selectSupById",
    method: "get",
    params: { supplierId },
  });
}

// 获取供应商详情
export function getSupplierInfoApi(supplierId) {
  return request({
    url: "/system/supplier/getEvaBySupId",
    method: "get",
    params: { supplierId },
  });
}

// 删除供应商
export function deleteSupplierApi(supplierId) {
  return request({
    url: `/system/supplier/del`,
    method: "get",
    params: { supplierId },
  });
}
